package cn.edu.sdjzu.xg23.kcsj01_backend.mapper;


import cn.edu.sdjzu.xg23.kcsj01_backend.entity.authority.UserAssRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserAssRoleMapper {

    // 新增用户角色关联
    boolean insertBatch(@Param("list") List<UserAssRole> userRoles);


    // 校验用户是否拥有某个角色
    boolean existsByUserIdAndRoleId(@Param("userId") Long userId, @Param("roleId") Long roleId);
}
